From: Takashi Iwai Date: Thu, 6 Nov 2008 23:49:48 +0000 (+0100) Subject: ALSA: hda - Fix broken hash chain allocation X-Git-Tag: archive/raspbian/4.9.13-1+rpi1~10^2~23770^2~45^2~76 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=ea2da6e898033b9736a26cf588b9ce841a433337;p=linux-4.9.git ALSA: hda - Fix broken hash chain allocation The chaining for amp hash got broken due to the rewrite with snd_array. Fixed now. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 6f170b281e85..06e99c785155 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -901,6 +901,7 @@ static struct hda_cache_head *get_alloc_hash(struct hda_cache_rec *cache, info = snd_array_new(&cache->buf); if (!info) return NULL; + cur = cache->buf.used - 1; /* the last entry */ info->key = key; info->val = 0; info->next = cache->hash[idx];